package com.yykj.drup.server.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yykj.drup.server.mapper.StoreDao;
import com.yykj.drup.server.model.Store;
import com.yykj.drup.server.service.StoreService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zengg
 * @since 2022-03-09
 */
@Service
@AllArgsConstructor
public class StoreServiceImpl extends ServiceImpl<StoreDao, Store> implements StoreService {

    final StoreDao storeDao;

    /**
     * 获取常用药店列表（排序）
     * @param doctorId 医生标识
     * @return
     */
    @Override
    public List<Store> findByDoctorId(String doctorId) {
        List<Store> storeListOrder = storeDao.findStoreListOrder(doctorId);
        return storeListOrder;
    }

    @Override
    public List<Store> findStoreList(String doctorId,String storeName) {
        //倒序获取医生常用药店及其余药店
        return storeDao.findStoreList(doctorId,storeName);
    }

    @Override
    public List<Store> getPrescriptionStoreProductDtoByproductIds(List<Integer> productIds) {

        return null;
    }
}
